#!/bin/sh
#Wipe the NAND flash. 
if [ -h /dev/mtd-user1-nand ]; then
	printf "${log_pre}Erasing NAND user1 flash region"
	flash_unlock /dev/mtd-user1-nand > /dev/null 2>&1
	flash_erase /dev/mtd-user1-nand 0 0
fi
if [ -h /dev/mtd-user2-nand ]; then
	printf "${log_pre}Erasing NAND user2 flash region"
	flash_unlock /dev/mtd-user2-nand > /dev/null 2>&1
	flash_erase /dev/mtd-user2-nand 0 0
fi
if [ -h /dev/mtd-cfg1 ]; then
	printf "${log_pre}Erasing NAND cfg1 flash region"
	flash_unlock /dev/mtd-cfg1 > /dev/null 2>&1
	flash_erase /dev/mtd-cfg1 0 0
fi
